PROJECT (Charts)

IF(NOT VTK_BINARY_DIR)
FIND_PACKAGE(VTK REQUIRED)
IF(NOT VTK_USE_CHARTS)
  MESSAGE(FATAL_ERROR "Example ${PROJECT_NAME} requires VTK_USE_CHARTS.")
ENDIF(NOT VTK_USE_CHARTS)
INCLUDE(${VTK_USE_FILE})
ENDIF(NOT VTK_BINARY_DIR)

IF(VTK_USE_VIEWS)
  ADD_EXECUTABLE(GraphItem GraphItem.cxx vtkGraphItem.cxx)
  TARGET_LINK_LIBRARIES(GraphItem vtkCharts)
ENDIF(VTK_USE_VIEWS)

ADD_EXECUTABLE(PiecewiseItem PiecewiseItem.cxx)
TARGET_LINK_LIBRARIES(PiecewiseItem vtkCharts)

IF(VTK_USE_QVTK)

set(QT_QMAKE_EXECUTABLE C:\\Qt\\4.8.5\\bin\\qmake.exe)
set(QT_MOC_EXECUTABLE C:\\Qt\\4.8.5\\bin\\moc.exe) 
set(QT_RCC_EXECUTABLE C:\\Qt\\4.8.5\\bin\\RCC.exe) 
set(QT_UIC_EXECUTABLE C:\\Qt\\4.8.5\\bin\\Uic.exe)

  FIND_PACKAGE(Qt4 REQUIRED)
  INCLUDE(${QT_USE_FILE})
  INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR})
  ADD_EXECUTABLE(QChartTable QChartTable.cxx)
  TARGET_LINK_LIBRARIES(QChartTable
    QVTK
    ${QT_LIBRARIES}
    vtkRendering
    vtkCharts
  )
  ADD_EXECUTABLE(QScalarsToColors QScalarsToColors.cxx)
  TARGET_LINK_LIBRARIES(QScalarsToColors
    QVTK
    ${QT_LIBRARIES}
    vtkRendering
    vtkCharts
  )
ENDIF(VTK_USE_QVTK)
